import React from 'react';
import {formatDate} from '../../utils';
/**
 * 加载公共组件
 * */
import MainSection from '../../components/MainSection/MainSection';
import Avatar from '../../components/Avatar/Avatar';

/**
 * 加载样式或图片文件
 * */
import './sass/applyList.scss';

class ApplyList extends React.Component {

    constructor(props) {
        super(props);
        this.state = {};
    }

    render() {
        const {actions, user, act} = this.props;
        return (
            <MainSection className="apply-list" title="已报名">
                <ul>
                    {
                        act.curAct.volunteerStatus.map((item, index)=> {
                            return (
                                <li key={index}>
                                    <Avatar src={item.avatar}/>
                                    <div className="info">
                                        <p className="name">{item.name}</p>
                                        <p className="time">{formatDate(item.applyTime,true)}</p>
                                    </div>
                                </li>
                            )
                        })
                    }
                </ul>
            </MainSection>
        );
    }
}

export default ApplyList;